#ifndef __BSP_STORE_H__
#define __BSP_STORE_H__

#include <stdint.h>

#include "acommon_err.h"
#include "bk9000_device.h"

/* 单元事件记录相关操作 */
acommon_err_t store_event_record_load(void);
acommon_err_t store_event_record_write(const bk9000_event_record_t *record);
acommon_err_t store_event_record_read(uint8_t idx, bk9000_event_record_t *record);

/* 单元运行记录相关操作 */
acommon_err_t store_operation_load(bk9000_unit_operation_t *data);
acommon_err_t store_operation_save(bk9000_unit_operation_t data);

/* 单元信息相关操作 */
acommon_err_t store_unit_info_get(bk9000_unit_info_t *info);
acommon_err_t store_unit_info_save(bk9000_unit_info_t info);
acommon_err_t store_unit_info_memset_default(bk9000_unit_info_t *info);
acommon_err_t store_unit_info_reset(bk9000_unit_info_t *info);
int           store_sn_check(const bk9000_unit_info_t *info, const uint8_t *const sn);

#endif /* __BSP_STORE_H__ */
